package main

import "fmt"
import "sort"

func mapSort(map1 map[string]string) string {
	var sliceKey []string
	for k, _ := range sliceKey {
		sliceKey = append(sliceKey, string(k))
	}
	sort.Strings(sliceKey)
	var str string
	for _, v := range sliceKey {
		str += fmt.Sprintf("%v=>%v\n", v, map1[v])
	}
	return str
}
func main() {
	m1 := map[string]string{
		"username": "hanmeimei",
		"age":      "35",
		"sex":      "女",
		"height":   "155",
	}
	result := mapSort(m1)
	fmt.Println(result)
}
